# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Hugo Osvaldo Barrera <hugo@whynothugo.nl>
pkgname=usbmuxd
pkgver=1.1.1
pkgrel=6
pkgdesc="Socket Daemon to multiplex connections from iOS"
url="https://github.com/libimobiledevice/usbmuxd"
arch="all"
makedepends="automake autoconf libtool libusb-dev libplist-dev
	libimobiledevice-dev"
license="GPL-2.0-or-later"
install="$pkgname.post-install"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/libimobiledevice/usbmuxd/archive/$pkgver.tar.gz
	001-confiure-no-udev.patch
	libplist-2.3.0.patch
	"

prepare() {
	default_prepare
	autoreconf -fi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--without-systemd
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
500e5f9a3500ad49bd8c195da71586db88964dd62dd716bb6a30827cc42bfdab38326b98204afdf606b1795d270d7f0261a59576558405de3540f6038a575856  usbmuxd-1.1.1.tar.gz
a8a4ed6877c691a44b53b2c554149c90034cbed8d48e0daf682aa7afbfb8f12cb05e4d99bd05dccc2e814f6001ccf19d61e9bff8c2da5e44ede386ea3565661f  001-confiure-no-udev.patch
03351f2cd20846f168e4ae5b4a44397bbca44994b3345d534de9d3c5b376d2e696ccd09e96d72b48ead068cd28f502e460443a736633c6bf7f5a603a7a0620d1  libplist-2.3.0.patch
"
